<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
<title>丫丫微博通</title>
</head>
<body>
<div id="page">
<%@ include file="header.jsp" %>
<div id="wrapper">
	<div id="content">
	 <dl id="status-box">
	 <dt class="subtitle">大家正在说</dt>
	 <dd>
	<c:forEach var="status" items="${statuses}">
		<div class="status-wrapper">
    <div class="status">
      <div class="status-pic"><a target="_blank" href="${status.account.url}"><img title="${status.account.screenName}"  src="${status.account.profileImage}"></a></div>
      <div class="status-content"> 
      <a title="${status.account.screenName}" target="_blank" href="${status.account.url}">${status.account.screenName}</a>
      ： ${status.formatText}</div>
      <div class="status-metadata">
                    来自 <a href="${status.account.url}" target="_blank">${status.serviceType.title}</a>
      	作者的其他帐号
                 <c:forEach var="a" items="${status.otherAccounts}">
                 									<a href="${a.url}" target="_blank">${a.serviceType.title}</a>
                 </c:forEach>
</div>
    </div>
		</div>
	</c:forEach>	 
		
	</dd>
	 </dl>
	</div>
	<div id="sidebar">
	<c:if test="${!isLogin}">
	  <dl >
	       				<dt class="subtitle">用户登录</dt>
	       				<dd>
	      <form action="/login" method="post">
	      <div id="login-form" class="loginform">
          <div class="input-bg">
          						邮箱:<br/>
            <input type="text" id="email" name="email" title="邮箱 "  alt="邮箱"   value="${email}">
          </div>
          <div class="input-bg">
          						密码:<br/>
            <input type="password" id="password" name="password" title="密码"  alt="密码"  value="${password}" >
          </div>
          <div class="setting">
          </div>
          <div class="signin"><input type="submit" value="登录"  title="登录"  alt="登录"/>
          </div>
          	<div class="signin-with-google"><a href="/login?auth=google" title="用Google帐号登录">用Google帐号登录</a>
          </div>
          	<div class="signup"><a href="/register" title="注册新帐号">注册帐号</a>
          </div>
        </div>
 				</form>
 				
	   </dd>
	    
	  </dl>
	  </c:if>
	  <c:if test="${isLogin}">
	  				  <dl >
	       				<dt class="subtitle"></dt>
	       				<dd>
	       									<ul>
	       									<li>欢迎${ user.name}! </li>
	       									<li><a href="/dashboard">查看我的控制面板</a></li>
	       									</ul>
	       				</dd>
	       				</dl>
	  </c:if>
	</div>
</div>

<%@ include file="footer.jsp" %>
</div>
</body>
</html>